<template>
	<view class="warp">
		<rich-text :nodes="des" v-if="des"></rich-text>
	</view>
</template>

<script>
	const db = uniCloud.database();
	
	export default {
		name:"wolf-share-header",
		data() {
			return {
				des:'',
				id:''
			}
		},
		onLoad(op) {
			if(op.id){
				this.id=op.id
			}
			this.loadData()
		},
		methods: {
			loadData(){
				if(!this.id){
					return 
				}
				db.collection('wolf-read').doc(this.id).field('des').get().then(res=>{
					this.des = res.result.data[0].des
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	view{
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
	}
	.warp{
		padding: 10rpx;
	}
</style>
